package com.moss.cloud.base.api.model.from;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

@Data
public class GatewayRoutesFrom implements Serializable {
    private Long id;
    /** 路由id */
    @NotBlank(message = "路由ID不能为空")
    @Size(min = 3, max = 100, message = "路由ID最小3位，最大100位")
    private String routeId;
    /** uri路径 */
    @NotBlank(message = "uri路径不能为空")
    @Size(min = 3, max = 100, message = "uri路径最小3位，最大100位")
    private String uri;
    /** 判定器 */
    @NotBlank(message = "判定器不能为空")
    private String predicates;
    /** 过滤器 */
    @NotBlank(message = "过滤器不能为空")
    private String filters;
    /** 排序 */
    @NotNull(message = "排序不能为空")
    private Integer orders;
    /** 描述 */
    @Size(min = 3, max = 500, message = "描述最小3位，最大500位")
    private String description;
    /** 状态：Y-有效，N-无效 */
    @NotBlank(message = "状态不能为空")
    private String status;
}
